package com.caocaog.market.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 店铺与账号绑定
 *
 * @author chechen
 * @date 2021-11-21
 */
@Data
@TableName("mk_bind_shop_member")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "mk_bind_shop_member对象", description = "店铺与账号绑定")
public class ShopMemberBind {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "绑定人")
    private String createBy;

    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "绑定时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @TableField(update = "%s+1")
    @ApiModelProperty(value = "版本号")
    private Integer lockVersion;

    @Dict(dicCode = "mk_whether")
    @TableLogic
    @ApiModelProperty(value = "解绑标记（删除标记）")
    private Integer delFlag;

    @Dict(dictTable = "mk_shop_basic", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "门店id")
    private String shopId;

    @Dict(dictTable = "mk_merchant_basic", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "商家id")
    private String merchantId;

    @ApiModelProperty(value = "cc_member表sid")
    private Integer ptId;

    @ApiModelProperty(value = "cc_member表login_name")
    private String ptLoginName;

    /**
     * 跑腿账号余额，从跑腿库中查询到的
     */
    private transient String ccptBalance;
}
